//package com.example.springkafka.listener;
//
//import com.example.springkafka.SpringKafkaApplication;
//import org.springframework.kafka.annotation.KafkaListener;
//import org.springframework.kafka.support.Acknowledgment;
//import org.springframework.stereotype.Component;
//
///**
// * @author lenovo
// */
//@Component
//public class HelloConsumer {
//
//    //监听一个或者多个Topic
//    @KafkaListener(topics = SpringKafkaApplication.TOPIC_NAME,containerFactory = "kafkaManualAckListenerContainerFactory")
//    public void handler(String message, Acknowledgment ack){
//        System.out.println("收到消息："+message);
//        //确认收到消息
//        ack.acknowledge();
//    }
//}
//
